<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./productionReport.xhtml">

            <ui:define name="tabContent">

                <p:panel header="Theo tháng">
                    <h:form>
                        <h:panelGrid columns="5">
                            Tháng 
                            <p:inputText value="#{productionByTimeBean.monthStr}" id="txtMonth"/>
                            <p:watermark for="txtMonth" value="01/2011,02/2012"/>
                            <p:commandButton ajax="false" value="Xem báo cáo" action="#{productionByTimeBean.reportByMonth()}"/>
                            <p:commandButton ajax="false" value="Xem 3 tháng gần đây" action="#{productionByTimeBean.reportByCurrentMonth()}"/>
                        </h:panelGrid>
                    </h:form>
                    <br/>
                    <h:form>
                        <p:dataTable id="tblByMonth" value="#{productionByTimeBean.productionMonths}" var="monthItem">

                            <p:column headerText="Tháng" sortBy="#{monthItem.date}">
                                #{monthItem.date}
                            </p:column>
                            <p:column headerText="6071" sortBy="#{monthItem.p6071}">
                                #{monthItem.p6071}
                            </p:column>
                            <p:column headerText="6171" sortBy="#{monthItem.p6171}">
                                #{monthItem.p6171}
                            </p:column>
                            <p:column headerText="6271" sortBy="#{monthItem.p6271}">
                                #{monthItem.p6271}
                            </p:column>
                            <p:column headerText="6371" sortBy="#{monthItem.p6371}">
                                #{monthItem.p6371}
                            </p:column>
                            <p:column headerText="6471" sortBy="#{monthItem.p6471}">
                                #{monthItem.p6471}
                            </p:column>
                            <p:column headerText="6571" sortBy="#{monthItem.p6571}">
                                #{monthItem.p6571}
                            </p:column>
                            <p:column headerText="6671" sortBy="#{monthItem.p6671}">
                                #{monthItem.p6671}
                            </p:column>
                            <p:column headerText="6771" sortBy="#{monthItem.p6771}">
                                #{monthItem.p6771}
                            </p:column>
                        </p:dataTable>
                    </h:form>

                </p:panel>


                <p:panel header="Theo ngày">
                    <h:form>
                        <h:panelGrid columns="5">
                            Ngày
                            <p:inputText value="#{productionByTimeBean.daysStr}" id="txtDay"/>
                            <p:commandButton ajax="false" value="Xem báo cáo" action="#{productionByTimeBean.reportByDay()}"/>
                            <p:commandButton ajax="false" value="Xem 7 ngày gần đây" action="#{productionByTimeBean.reportByLast7Day()}"/>
                        </h:panelGrid>
                    </h:form>
                    <br/>
                    <h:form>
                        <p:dataTable id="tblByDay" value="#{productionByTimeBean.productionDays}" var="monthItem">

                            <p:column headerText="Ngày" sortBy="#{monthItem.date}">
                                #{monthItem.date}
                            </p:column>
                            <p:column headerText="6071" sortBy="#{monthItem.p6071}">
                                #{monthItem.p6071}
                            </p:column>
                            <p:column headerText="6171" sortBy="#{monthItem.p6171}">
                                #{monthItem.p6171}
                            </p:column>
                            <p:column headerText="6271" sortBy="#{monthItem.p6271}">
                                #{monthItem.p6271}
                            </p:column>
                            <p:column headerText="6371" sortBy="#{monthItem.p6371}">
                                #{monthItem.p6371}
                            </p:column>
                            <p:column headerText="6471" sortBy="#{monthItem.p6471}">
                                #{monthItem.p6471}
                            </p:column>
                            <p:column headerText="6571" sortBy="#{monthItem.p6571}">
                                #{monthItem.p6571}
                            </p:column>
                            <p:column headerText="6671" sortBy="#{monthItem.p6671}">
                                #{monthItem.p6671}
                            </p:column>
                            <p:column headerText="6771" sortBy="#{monthItem.p6771}">
                                #{monthItem.p6771}
                            </p:column>
                        </p:dataTable>
                    </h:form>

                </p:panel>
            </ui:define>

        </ui:composition>

    </body>
</html>

